package xpn.business.fund_return.entity.decision;

import org.springframework.data.rest.webmvc.RepositoryRestController;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xpn.platform.common.repository.XpnRepositoryController;

import javax.annotation.Resource;

@RestController
@RepositoryRestController
@RequestMapping("decision")
public class DecisionController extends XpnRepositoryController<Decision, Long> {

    @Resource
    private DecisionService decisionService;

    @PostMapping("")
    public Decision saveDecision(@RequestBody Decision decision) {
        return decisionService.save(decision);
    }
}
